#!/bin/bash
set -ev

# On Travis, this leaves more memory to the forked JVM where tests are run
export SBT_OPTS="-J-Xmx512m -J-Xms512m"

SCALA_VERSION=${TRAVIS_SCALA_VERSION:-2.11.8}

function testOnly() {
  sbt ++$SCALA_VERSION "testOnly $@"
}

if grep -q '$2\.12\.' <(echo "$SCALA_VERSION"); then
  testOnly jupyter.Spark16Tests
  testOnly jupyter.Spark20Tests
fi

